// 动物声音模拟器设计
// 动物抽象类
abstract class Animal {
    abstract void cry();
    abstract String getAnimalName();
}
// 狗类，继承自Animal
class Dog extends Animal {
    @Override
    void cry() {
        System.out.println("汪汪");
    }
    @Override
    String getAnimalName() {
        return "狗";
    }
}
// 猫类，继承自Animal
class Cat extends Animal {
    @Override
    void cry() {
        System.out.println("喵喵");
    }
    @Override
    String getAnimalName() {
        return "猫";
    }
}
// 模拟器类
class Simulator {
    public void playSound(Animal animal) {
        animal.cry();
        System.out.println("动物种类：" + animal.getAnimalName());
    }
}
// 主类Application
class Application {
    public static void main(String[] args) {
        Simulator simulator = new Simulator();
        simulator.playSound(new Dog());
        simulator.playSound(new Cat());
    }
}